﻿using System;
using System.Collections.Generic;
using System.Text;
using Model = SharePointOptimizer.Model;
using SharePointOptimizer.Model;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Collections;
using System.Data.SqlTypes;
using SharePointOptimizer.BL.DataAnalysis.IssueTypes;
using AG.Utilities;

namespace SharePointOptimizer.BL.DataAnalysis
{
    public delegate void RunAllIssueChecks();
    
    public class CheckSharePointFarmForIssues
    {
        public void RunIssueChecks()
        {
            List<IssueTypeCheckBase> issueTypesToCheck = IssueTypesFactory.GetAllChecks();
           
            foreach (IssueTypeCheckBase issueType in issueTypesToCheck)
            {
                try
                {

                    issueType.Check();
                }
                catch (Exception ex)
                {
                    Logger.Error(issueType.GetType().FullName,  ex);
                }
               
            }


            


        }
    }
}
